Skip to content

Sanitize ODBC sample connection string to unblock dnceng mirror - #8321

Merged
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/fix-mirror-credscan-pwd
May 18, 2026
Merged

Sanitize ODBC sample connection string to unblock dnceng mirror#8321
Evangelink merged 1 commit into
mainfrom
dev/amauryleve/fix-mirror-credscan-pwd

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Fixes #8291.

Root cause

PR #8270 (Refactor TestDataConnectionSql into focused partial modules) moved a long-standing doc comment containing a sample ODBC connection string into a brand-new file TestDataConnectionSql.Helpers.cs. That comment contains the literal substring Pwd=password, which Azure DevOps push protection flags as an embedded credential (VS403654ODBC connection string with credentials) and rejects the fast-forward mirror push from GitHub to dev.azure.com/dnceng/internal/_git/microsoft-testfx.

The same comment lived in TestDataConnectionSql.cs since the 2016 initial commit and had already been mirrored long before push protection was enabled, so the original location is grandfathered in. The refactor re-introduced the pattern in a new file, which now trips the scanner on every subsequent push.

Timing matches:

Event Time (UTC)
Commit 037e9b09e pushed 2026-05-16 14:22
dnceng-bot opens #8291 2026-05-16 14:28

Fix

Replace Uid=user;Pwd=password with Uid=<user>;Pwd=<password> (XML-encoded as &lt;user&gt;/&lt;password&gt; so the doc-comment XML stays valid). The example remains useful and self-explanatory but no longer matches the connection-string-with-credentials detector.

The doc-comment in TestDataConnectionSql.Helpers.cs contained the literal
substring `Pwd=password`, which Azure DevOps push protection flags as an
embedded credential (VS403654), causing the GitHub -> AzDO mirror of
microsoft/testfx to fail (#8291).

The same comment lived in TestDataConnectionSql.cs since 2016 and had
been mirrored long before push protection started flagging it. The
recent refactor (#8270) re-introduced the pattern in a new file, which
triggered the scanner on every subsequent fast-forward push.

Replace `Uid=user;Pwd=password` with `Uid=<user>;Pwd=<password>` so the
example remains useful but no longer matches the connection-string-with-
credentials detector.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 18, 2026 11:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR sanitizes a sample ODBC connection string in a documentation comment to avoid Azure DevOps push protection treating it as an embedded credential, unblocking repository mirroring.

Changes:

  • Replaces literal sample credentials with XML-escaped placeholders in the ODBC example.
  • Preserves the usefulness and XML validity of the doc comment.
Show a summary per file
File Description
src/Adapter/MSTestAdapter.PlatformServices/Data/TestDataConnectionSql.Helpers.cs Sanitizes the ODBC Oracle sample connection string in the KnownOdbcDrivers remarks.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@Evangelink Evangelink left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

This is a single-line XML doc comment fix that HTML-encodes user and password placeholders so they render correctly as <user> and <password> in generated documentation rather than being misinterpreted as XML tags.

# Dimension Status Notes
1 Algorithmic Correctness ✅ N/A No logic changes
2 Threading & Concurrency ✅ N/A No threading changes
3 Security & IPC Contract Safety ✅ Clean Encoding placeholders reduces risk of misreading as real credentials
4 Public API & Binary Compatibility ✅ N/A Comment-only change
5 Performance & Allocations ✅ N/A No runtime change
6 Cross-TFM Compatibility ✅ N/A No runtime change
7 Resource & IDisposable Management ✅ N/A No runtime change
8 Defensive Coding at Boundaries ✅ N/A No runtime change
9 Localization & Resources ✅ N/A No runtime change
10 Test Isolation ✅ N/A No test changes
11 Assertion Quality ✅ N/A No test changes
12 Flakiness Patterns ✅ N/A No test changes
13 Test Completeness & Coverage ✅ N/A Documentation-only
14 Data-Driven Test Coverage ✅ N/A Documentation-only
15 Code Structure & Simplification ✅ N/A No structural changes
16 Naming & Conventions ✅ N/A No naming changes
17 Documentation Accuracy ✅ Clean <user> and <password> correctly encode angle-bracket placeholders so XML doc tools render them as <user> and <password> rather than stripping them as unknown XML tags
18 Analyzer & Code Fix Quality ✅ N/A Not an analyzer change
19 IPC Wire Compatibility ✅ N/A No runtime change
20 Build Infrastructure & Dependencies ✅ N/A No build changes
21 Scope & PR Discipline ✅ Clean Minimal, focused fix

Verdict: ✅ Clean documentation fix. No issues found.

Generated by Expert Code Review (on open) for issue #8321 · ● 4.3M

@Evangelink
Evangelink merged commit acbe057 into main May 18, 2026
30 of 35 checks passed
@Evangelink
Evangelink deleted the dev/amauryleve/fix-mirror-credscan-pwd branch May 18, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dnceng-bot] Branch testfx/main can't be mirrored to Azdo fast forward branch

2 participants